package com.hw.protocol.tool.decode.hw;

import com.hw.protocol.tool.model.entity.hw.AbsFlowMeter;
import com.hw.protocol.tool.model.entity.hw.Dtu38His;

/**
 * @author : lihy
 * @date : 2023/3/23 14:44
 * description: 流量计(38898/38899)历史数据解码器
 */
public class Dtu38HisDecode extends FlowMeterDecodeTemplate implements IHisDecode {

    private Dtu38His fm;

    Dtu38HisDecode(AbsFlowMeter fm, byte[] data) {
        super(fm, data);
        this.fm = (Dtu38His)fm;
    }

    @Override
    void setTime() {
        fm.setTime(getTime(dataBuf));
    }

    @Override
    boolean hisData() {
        return true;
    }
}
